package com.pureut.system.api.factory;

import com.pureut.common.core.web.domain.AjaxResult;
import com.pureut.system.api.FeignService;
import com.pureut.system.api.domain.SysTheAlarmDto;
import com.pureut.system.api.domain.SysWorkbenchMessage;
import com.pureut.system.api.vo.SysAuditHistoryVo;
import com.pureut.system.api.vo.SysWorkbenchAuditAgentVo;
import com.pureut.system.api.vo.SysWorkbenchMessageVo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

import java.util.List;


/**
 * 服务降级处理
 * 
 * @author ruoyi
 */
@Component
public class RemoteSystemFallbackFactory implements FallbackFactory<FeignService>
{
    private static final Logger log = LoggerFactory.getLogger(RemoteSystemFallbackFactory.class);

    @Override
    public FeignService create(Throwable throwable)
    {
        log.error("服务调用失败:{}", throwable.getMessage());
        return new FeignService()
        {

            @Override
            public AjaxResult getInfo(long materialId) {
                return null;
            }

            @Override
            public AjaxResult getHalfInfo(long materialId) {
                return null;
            }

            @Override
            public AjaxResult getAwmateriaInfo(long materialId) {
                return null;
            }

            @Override
            public AjaxResult getAccessoriesInfo(long materialId) {
                return null;
            }

            @Override
            public AjaxResult getWasteInfo(long materialId) {
                return null;
            }

            @Override
            public String getUserName(Long userId) {
                return null;
            }

            @Override
            public String splitList(String str1) throws Exception {
                return null;
            }

            @Override
            public AjaxResult getDeptInfo(Long deptId) {
                return null;
            }

            @Override
            public int getValue(String dictType, String dictLable) {
                return 0;
            }

            @Override
            public AjaxResult roleByUserId(Long userId) {
                return null;
            }

            @Override
            public AjaxResult getSequenceTwo(String perms, int moduleType, int auditState, String auditRemarks, String auditDoc, long userId) {
                return null;
            }

            @Override
            public AjaxResult editHistory(SysAuditHistoryVo sysAuditHistoryVo) {
                return null;
            }

            @Override
            public AjaxResult getDosageByMaterialId(Long bomId, int bomDetailType) {
                return null;
            }

            @Override
            public Long getIdByMenuName(String menuName) {
                return null;
            }

            @Override
            public AjaxResult getModelingInfo(long modelingId) {
                return null;
            }

            @Override
            public String getAuthorityCoding(String docConfig) {
                return null;
            }

            @Override
            public AjaxResult getWorkshopId(String lineCode) {
                return null;
            }

            @Override
            public AjaxResult typeList(int type) {
                return null;
            }

            @Override
            public AjaxResult detailComposition(String materialCode) {
                return null;
            }

            @Override
            public AjaxResult selectCodingId(String materialCode) {
                return null;
            }

            @Override
            public AjaxResult getDrviceInfo(String drviceCode) {
                return null;
            }

            @Override
            public AjaxResult selectCodingRulesById(String codingId) {
                return null;
            }

            @Override
            public AjaxResult selectMaterialCodingList() {
                return null;
            }

            @Override
            public Long getLineId(String lineCode) {
                return null;
            }

            @Override
            public AjaxResult getHalfData(String materialCode) {
                return null;
            }

            @Override
            public AjaxResult selectAllByAlarmMaterialCode(String materialCode) {
                return null;
            }

            @Override
            public AjaxResult selectAccessoriesMaterialCode(String materialCode) {
                return null;
            }

            @Override
            public AjaxResult selectMaterialHalfMaterialCode(String materialCode) {
                return null;
            }

            @Override
            public AjaxResult selectMaterialFinishedMaterialCode(String materialCode) {
                return null;
            }

            @Override
            public String getWorkshopCode(String lineCode) {
                return null;
            }

            @Override
            public AjaxResult getAwmateriaViewByMaterialCode(String materialCode) {
                return null;
            }

            @Override
            public AjaxResult getHalfViewByMaterialCode(String materialCode) {
                return null;
            }

            @Override
            public AjaxResult getHalfBomDetailData(String materialCode) {
                return null;
            }

            @Override
            public Long getStorage(String lineCode) {
                return null;
            }

            @Override
            public AjaxResult getByUserName(String userName) {
                return null;
            }

            @Override
            public SysTheAlarmDto getAlarm(String materialCode,String type) {
                return null;
            }

            @Override
            public AjaxResult listDetailInventory(long bomId) {
                return null;
            }

            @Override
            public AjaxResult insertWork(List<SysWorkbenchMessageVo> list) {
                return null;
            }

            @Override
            public List<SysWorkbenchMessage> getInfo(String type) {
                return null;
            }

            @Override
            public boolean insertAuditAgent(SysWorkbenchAuditAgentVo sysWorkbenchAuditAgentVo) {
                return false;
            }

            @Override
            public boolean updateStatus(int status, String receiptNumber,String modelName) {
                return false;
            }

            @Override
            public boolean deleteDoc(String receiptNumber,String modelName) {
                return false;
            }

            @Override
            public AjaxResult getAccessoriesViewByMaterialCode(String materialCode) {
                return null;
            }

            @Override
            public AjaxResult getFinishViewByMaterialCode(String materialCode) {
                return null;
            }


            @Override
            public AjaxResult getUserNameByIds(String userIds) {
                return null;
            }

            @Override
            public AjaxResult getModelingLineInfo(String lineCode) {
                return null;
            }


        };

    }
}
